package com.wangzhen.spring.resource;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Map;

public class ReadYamlPropertiesDemo {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring-yaml.xml");
        // 获取注入的yamlMap配置
        Map<String, Object> yamlMap = context.getBean("yamlMap", Map.class);
        // 打印user.yaml中的所有属性
        System.out.println(yamlMap);

    }
}
